package com.cxso.example.request.sign;

import com.cxso.example.domain.sign.SimpleFormFieldsDomain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Getter
@Setter
@Schema(description = "pdf模板和组件生成合同")
public class SignCreateByTemplateComponentsRequest {


    @Schema(description = "手机号", example = " 18888888888")
    @NotBlank(message = "手机号不能为空")
    private String mobilePhone;

    @Schema(description = "模板编码", example = " 1C4224D40621F925")
    @NotBlank(message = "模板编码不能为空")
    private String templateNumber;

    @Schema(description = "合同编号", example = " 非必填， 为空系统自动生成")
    private String contractNum;

    @Schema(description = "文件名称", example = " 文件名称")
    @NotBlank(message = "文件名称不能为空")
    private String name;

    @Schema(description = "填充内容", example = "key:value 传入")
    @Valid
    @NotEmpty(message = "填充内容不能为空")
    private List<SimpleFormFieldsDomain> simpleFormFields;

}
